package com.gegong.imr.client.vbox.cmd;

public class CreateVMCmdFailException extends Exception {

    private String vmName;
    private Class<? extends IVBoxCmd> cmdClass;


    public CreateVMCmdFailException(String vmName, Class<? extends IVBoxCmd> cmdClass) {
        this.vmName = vmName;
        this.cmdClass = cmdClass;
    }


    public CreateVMCmdFailException(Throwable cause, String vmName, Class<? extends IVBoxCmd> cmdClass) {
        super(cause);
        this.vmName = vmName;
        this.cmdClass = cmdClass;
    }

    @Override
    public String getMessage() {
        return String.format("在虚拟机%s上创建命令%s时发生异常", vmName, this.cmdClass.getName());
    }
}
